import compose from 'koa-compose';

import controllers from 'controllers';

import logger from 'policies/logger';
import compress from 'policies/compress';
import assets from 'policies/assets';
import staticFile from 'policies/static';

// 中间件的顺序，从上至下
export default compose([
  compress, 
  logger,
  assets, 
  staticFile,
  controllers, // 控制器
])